package com.tegtech.tools.aliyun.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Getter;

/**
 * aliyun配置
 * @Author Jun
 * @date 2021年4月27日 下午4:07:07
 */
@Component
public class AliyunProperties {

	@Getter
	private static String accessId;
	
	@Getter
	private static String accessSecret;
	
	@Getter
	private static String ossEndpoint;
	
	@Getter
	private static String ossBucket;
	
	@Getter
	private static String ossHost;
	
	@Getter
	private static String stsEndpoint;
	
	@Getter
	private static String stsRoleArn;
	
	@Getter
	private static String smsSignName;
	
	@Getter
	private static Long pushAppKey;

	@Value("${aliyun.access.id}")
	public void setAccessId(String accessId) {
		AliyunProperties.accessId = accessId;
	}

	@Value("${aliyun.access.secret}")
	public void setAccessSecret(String accessSecret) {
		AliyunProperties.accessSecret = accessSecret;
	}

	@Value("${aliyun.oss.endpoint}")
	public void setOssEndpoint(String ossEndpoint) {
		AliyunProperties.ossEndpoint = ossEndpoint;
	}

	@Value("${aliyun.oss.bucket}")
	public void setOssBucket(String ossBucket) {
		AliyunProperties.ossBucket = ossBucket;
	}

	@Value("${aliyun.oss.host}")
	public void setOssHost(String ossHost) {
		AliyunProperties.ossHost = ossHost;
	}

	@Value("${aliyun.sts.endpoint}")
	public void setStsEndpoint(String stsEndpoint) {
		AliyunProperties.stsEndpoint = stsEndpoint;
	}

	@Value("${aliyun.sts.roleArn}")
	public void setStsRoleArn(String stsRoleArn) {
		AliyunProperties.stsRoleArn = stsRoleArn;
	}

	@Value("${aliyun.sms.signName}")
	public void setSmsSignName(String smsSignName) {
		AliyunProperties.smsSignName = smsSignName;
	}
	
	@Value("${aliyun.push.appKey}")
	public void setPushAppKey(Long pushAppKey) {
		AliyunProperties.pushAppKey = pushAppKey;
	}
	
}
